import Vue from 'vue'
import co from 'co'
import * as Util from '../../components/Util'

let CardManageService = {
  install (Vue, options) {
    // 给vue增添对话框显示方法
    Vue.CardManageService = Vue.prototype.$CardManageService = CardManageService
  },

  updateNumber (data) {
    return Vue.resetpost('rs/entity/t_billcollec', data, {resolveMsg: '修改票号成功', rejectMsg: '修改票号失败'})
  },
  getCardNumber () {
    let data = {
      name: Util.f.name
    }
    return co(Vue.resetpost('rs/logic/getCardNumber', {data: data}, {resolveMsg: null, rejectMsg: '获取写卡权限失败'}))
  }
}

export default CardManageService
